/****************************************************************
 * Fulguro
 * Copyright (C) 2004 Christophe Clienti
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 ***************************************************************/

#ifdef __cplusplus
extern "C" {
#endif


#ifndef __FLGR_MORPHO_KER_OP_H
#define __FLGR_MORPHO_KER_OP_H

#include <flgrCoreDll.h>
#include <flgrCoreErrors.h>
#include <flgrCoreTypes.h>
#include <flgrCoreData.h>
#include <flgrCoreNhbManage.h>


/********************************************************** 2D ***********************************************************/

  EXPORT_LIB void flgr1d_get_nhb_minimum(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_minimum_fgBIT(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_minimum_fgUINT8(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_minimum_fgUINT16(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_minimum_fgUINT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_minimum_fgINT8(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_minimum_fgINT16(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_minimum_fgINT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_minimum_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_minimum_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox1D *extr);

  EXPORT_LIB void flgr1d_get_nhb_maximum(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_maximum_fgBIT(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_maximum_fgUINT8(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_maximum_fgUINT16(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_maximum_fgUINT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_maximum_fgINT8(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_maximum_fgINT16(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_maximum_fgINT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_maximum_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_maximum_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox1D *extr);

  EXPORT_LIB void flgr1d_get_nhb_median(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_median_fgUINT8(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_median_fgUINT16(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_median_fgUINT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_median_fgINT8(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_median_fgINT16(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_median_fgINT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_median_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_median_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox1D *extry);
 
  EXPORT_LIB void flgr1d_get_nhb_hit_or_miss(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_hit_or_miss_fgUINT8(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_hit_or_miss_fgUINT16(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_hit_or_miss_fgUINT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_hit_or_miss_fgINT8(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_hit_or_miss_fgINT16(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_hit_or_miss_fgINT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_hit_or_miss_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_hit_or_miss_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox1D *extr);

  EXPORT_LIB void flgr1d_get_nhb_thinning(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thinning_fgUINT8(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thinning_fgUINT16(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thinning_fgUINT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thinning_fgINT8(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thinning_fgINT16(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thinning_fgINT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thinning_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thinning_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox1D *extr);

  EXPORT_LIB void flgr1d_get_nhb_thickening(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thickening_fgUINT8(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thickening_fgUINT16(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thickening_fgUINT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thickening_fgINT8(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thickening_fgINT16(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thickening_fgINT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thickening_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox1D *extr);
  EXPORT_LIB void flgr1d_get_nhb_thickening_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox1D *extr);

/********************************************************** 2D ***********************************************************/

  EXPORT_LIB void flgr2d_get_nhb_minimum(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_minimum_fgBIT(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_minimum_fgUINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_minimum_fgUINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_minimum_fgUINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_minimum_fgINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_minimum_fgINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_minimum_fgINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_minimum_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_minimum_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox2D *extr);

  EXPORT_LIB void flgr2d_get_nhb_maximum(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_maximum_fgBIT(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_maximum_fgUINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_maximum_fgUINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_maximum_fgUINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_maximum_fgINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_maximum_fgINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_maximum_fgINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_maximum_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_maximum_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox2D *extr);

  EXPORT_LIB void flgr2d_get_nhb_median(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_median_fgUINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_median_fgUINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_median_fgUINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_median_fgINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_median_fgINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_median_fgINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_median_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_median_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox2D *extry);

  EXPORT_LIB void flgr2d_get_nhb_hit_or_miss(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_hit_or_miss_fgUINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_hit_or_miss_fgUINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_hit_or_miss_fgUINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_hit_or_miss_fgINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_hit_or_miss_fgINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_hit_or_miss_fgINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_hit_or_miss_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_hit_or_miss_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox2D *extr);

  EXPORT_LIB void flgr2d_get_nhb_thinning(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thinning_fgUINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thinning_fgUINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thinning_fgUINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thinning_fgINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thinning_fgINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thinning_fgINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thinning_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thinning_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox2D *extr);

  EXPORT_LIB void flgr2d_get_nhb_thickening(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thickening_fgUINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thickening_fgUINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thickening_fgUINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thickening_fgINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thickening_fgINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thickening_fgINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thickening_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_thickening_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox2D *extr);

  EXPORT_LIB void flgr2d_get_nhb_max_keep_skiz(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_max_keep_skiz_fgUINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_max_keep_skiz_fgUINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_max_keep_skiz_fgUINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_max_keep_skiz_fgINT8(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_max_keep_skiz_fgINT16(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_max_keep_skiz_fgINT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_max_keep_skiz_fgFLOAT32(FLGR_Vector *result, FLGR_NhbBox2D *extr);
  EXPORT_LIB void flgr2d_get_nhb_max_keep_skiz_fgFLOAT64(FLGR_Vector *result, FLGR_NhbBox2D *extr);

#endif

#ifdef __cplusplus
}
#endif
